package com.zeng.sim.controller.domain.response;

import lombok.Getter;
import lombok.Setter;

/**
 * 前端 tree 结果封装数据
 */
@Getter
@Setter
public class ResultTree {

    /**
     * 状态信息
     */
    private Status status = new Status();

    /**
     * 返回数据
     */
    private Object data;

    /**
     * 所需内部类
     */
    @Getter
    @Setter
    public class Status {

        private Integer code = 200;

        private String message = "默认";

    }

    public static ResultTree dataTree(Object data) {
        ResultTree resultTree = new ResultTree();
        resultTree.setData(data);
        return resultTree;
    }

}
